<?php if ( $profit->num_rows() >0 ): ?>
    <div class="fenrun-income flex">
        <div class="area-income flex-1">
            <p>已到账收入：</p>
            <span>￥<?php echo !empty($account) ? bcadd($account, 0, 2) : bcadd(0, 0, 2) ;?></span>
        </div>
        <div class="income flex-1">
            <p>未到账收入：</p>
            <span>￥<?php echo !empty($not_account) ? bcadd($not_account, 0, 2) : bcadd(0, 0, 2) ;?></span>
        </div>
    </div>
    <div class="fenrun-list">
        <ul class="am-cf tourism-profit-list">
            <?php $this->load->view('home/memberprofit/ajaxTourismPage'); ?>
        </ul>
        <div class="tourism-profit-more sec-load am-scrollspy-init <?php echo $more ? '' : 'am-hide'; ?>">
            <i class="iconfont am-animation-spin">&#xe60b;</i>
        </div>
        <div class="no-more <?php echo $more ? 'am-hide' : ''; ?>">
            没有更多了
        </div>
    </div>
<?php endif ?>
<script>
    /*商城分页*/
    $(document).ready(function () {
        if ($('#profit-form').size() > 0) {
            var pg = 2;
            $('.tourism-profit-more').scrollspy({
                animation: 'fade',
                delay: 500
            });
            $('.tourism-profit-more').on('inview.scrollspy.amui', function () {
                $.ajax({
                    'type': 'get',
                    'dataType': 'json',
                    'async': false,
                    'url': hostUrl() + 'memberprofit/ajaxTourismPage/?pg=' + pg,
                    'data': $('form').serialize(),
                    'success': function (data) {
                        if (data.status) {
                            pg++;
                            $('.tourism-profit-list').append(data.html);
                            $('img.lazy').lazyload({skip_invisible: false});
                        } else {
                            $('.tourism-profit-more').addClass('am-hide');
                            $('.no-more').removeClass('am-hide');
                        }
                    }
                })
            })
        }
        /*pin 钉住*/
        $('.fenrun-income').sticky({
            top: 0
        })
    })
</script>
